; Program 2
; this example takes a string and writes it backwards
main :
(#echo

   "Please enter a string to reverse:
"

   (reverse (#input))
)

; this is where we do the actual reversing
reverse :
(#isequal $0 "" 
   ""
   (#append (reverse (#rest $0)) (#first $0)) 
)
;end Program 2